﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Bas1a22
    {
		private string _listid;
		private string _sellerid;
		private string _shopid;
		private string _setname;
		private string _value;
		private string _valuedata;
		
        /// <summary>
        /// 主键
        /// </summary>
		public string Listid
		{
			get { return _listid;	 }
			set { _listid=value;	}
		}
        /// <summary>
        /// 销售商
        /// </summary>
		public string Sellerid
		{
			get { return _sellerid;	 }
			set { _sellerid=value;	}
		}
        /// <summary>
        /// 门店
        /// </summary>
		public string Shopid
		{
			get { return _shopid;	 }
			set { _shopid=value;	}
		}
        /// <summary>
        /// 设置项
        /// </summary>
		public string Setname
		{
			get { return _setname;	 }
			set { _setname=value;	}
		}
        /// <summary>
        /// 设置项值
        /// </summary>
		public string Value
		{
			get { return _value;	 }
			set { _value=value;	}
		}
        /// <summary>
        /// 值
        /// </summary>
		public string Valuedata
		{
			get { return _valuedata;	 }
			set { _valuedata=value;	}
		}
		
		public static List<Bas1a22> GetBas1a22ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Bas1a22> list = new List<Bas1a22>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Bas1a22 model = GetBas1a22ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Bas1a22 GetBas1a22ByDataRow(DataRow dr)
		{
			Bas1a22 model = new Bas1a22(); //实例化Bas1a22
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("listid")&&!(dr["listid"] is System.DBNull))  
				model.Listid = ( string)dr["listid"];
			if (dcc.Contains("sellerid")&&!(dr["sellerid"] is System.DBNull))  
				model.Sellerid = ( string)dr["sellerid"];
			if (dcc.Contains("shopid")&&!(dr["shopid"] is System.DBNull))  
				model.Shopid = ( string)dr["shopid"];
			if (dcc.Contains("setname")&&!(dr["setname"] is System.DBNull))  
				model.Setname = ( string)dr["setname"];
			if (dcc.Contains("value")&&!(dr["value"] is System.DBNull))  
				model.Value = ( string)dr["value"];
			if (dcc.Contains("valuedata")&&!(dr["valuedata"] is System.DBNull))  
				model.Valuedata = ( string)dr["valuedata"];
			
			return model;
		}
    }
}
